package basic_syntax

// Top-level variables:
val PI = 3.14
var x = 0

fun incrementX() {
    x += 1
}


fun main(args: Array<String>) {
    // Assign-once (read-only) local variable:
    val a: Int = 1  // immediate assignment
    val b = 2   // `Int` type is inferred
    val c: Int  // Type required when no initializer is provided
    c = 3       // deferred assignment

    // Mutable variable:
    var x = 5 // `Int` type is inferred
    x += 1

    incrementX()
}